import Movie from '@/views/Movie'
import City from '@/components/City'
import Coming from '@/components/Coming'
import Now from '@/components/Now'
import Search from '@/components/Search'
import Detail from '@/views/Movie/Detail'

export default {
    path:'/movie',
    name:'movie',
    component:Movie,
    children:[
        {
            path:'city',
            component:City
        },
        {
            path:'coming',
            component:Coming
        },
        {
            path:'now',
            component:Now
        },
        {
            path:'search',
            component:Search
        },
        {
            path:'detail/1/:id',
            components:{
                default:Now,
                detail:Detail
            }
        },
        {
            path:'detail/2/:id',
            components:{
                default:Coming,
                detail:Detail
            }
        },
        {
            path:'*',
            redirect:'now'
        }
    ]
}